{layout name="admin/layout" /}

<div class="col-xs-12">
    {if condition="has_menu($menu,'Admin/agAdd')"}
    <button class="btn btn-success store" data-url="{:url('agAdd')}" style="margin-bottom: 15px">新增栏目</button>
    {/if}
    <div class="table-responsive">
        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
            <thead>
            <tr>
                <th class="center">
                    <label>
                        <input type="checkbox" class="ace"/>
                        <span class="lbl"></span>
                    </label>
                </th>
                <th>名称</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            {volist name='list' id='v'}
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox" class="ace"/>
                        <span class="lbl"></span>
                    </label>
                </td>
                <td>{$v.title}</td>
                <td>{switch name='v.state'}{case value='0'}关闭{/case}{case value='1'}开放{/case}{/switch}</td>
                <td>{$v.add_time|date='Y-m-d H:i:s',###}</td>
                <td>
                    <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                        {if condition="has_menu($menu,'Admin/agedit')"}
                        <button class="btn btn-xs btn-info store" data-url="{:url('agEdit',array('id'=>$v['id']))}">
                            <i class="icon-edit bigger-120"></i>
                        </button>
                        {/if}
                        {if condition="has_menu($menu,'Admin/agdelete')"}
                        <button class="btn btn-xs btn-danger ajax" data-url="{:url('agDelete',array('id'=>$v['id']))}">
                            <i class="icon-trash bigger-120"></i>
                        </button>
                        {/if}
                    </div>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div><!-- /.table-responsive -->
</div><!-- /span -->